package com.adinnet.api.contact.service.impl;

import com.adinnet.api.contact.model.Contact;
import com.adinnet.api.contact.mapper.ContactMapper;
import com.adinnet.api.contact.model.ContactReq;
import com.adinnet.api.contact.service.ContactService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 联系我们（意见反馈） 服务实现类
 * </p>
 *
 * @author zYshuai
 * @since 2020-12-04
 */
@Service
public class ContactServiceImpl extends ServiceImpl<ContactMapper, Contact> implements ContactService {


    @Autowired
    private ContactMapper contactMapper;
    /**
     * 意见反馈
     * @param contacts
     * @param patient
     */
    @Override
    public void createContact(ContactReq contacts) {
        Contact contact=new Contact();
        BeanUtils.copyProperties(contacts,contact);
        contact.setStatus(0);
        contactMapper.insert(contact);
    }
}
